<?php

include '../Channel.php';

$to = $_GET['to'];
$message = $_GET['msg'];

//Open connection
$conn = mysql_connect("localhost", "root", "a65d68r");
mysql_select_db("cis", $conn);

$channel = Channel::getInstance($to);
$channel->setOptions(array("db_connection" => $conn));

$channel->sendMessage(array( "msg" => $message ), $to);

echo "{ok: 1}";

?>